/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
module dwt.widgets.monitor;


private import dwt.dwt;

private import dwt.graphics.rectangle;

/**
 * Instances of this class are descriptions of monitors.
 *
 * @see Display
 * 
 * @since 3.0
 */
public class JMonitor {

	private import dwt.internal.win32.os;
	
	
	HANDLE handle;
	int x, y, width, height;
	int clientX, clientY, clientWidth, clientHeight;
	
/**
 * Prevents uninitialized instances from being created outside the package.
 */
this () {	
}
	
public boolean equals (Object object) {
	if (object is this) return true;
	if (!(cast(JMonitor)object)) return false;
	JMonitor monitor = cast(JMonitor)object;
	return handle is monitor.handle;
}

/**
 * Returns a rectangle describing the receiver's size and location
 * relative to its device.
 *
 * @return the receiver's bounding rectangle
 */	
public Rectangle getBounds () {
	return new Rectangle (x, y, width, height);
}
	
/**
 * Returns a rectangle which describes the area of the
 * receiver which is capable of displaying data.
 * 
 * @return the client area
 */
public Rectangle getClientArea () {
	return new Rectangle (clientX, clientY, clientWidth, clientHeight);
}
	
public int hashCode () {
	return cast(int)handle;
}

}
